package zk.weart.api.activity.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import zk.weart.api.activity.entity.TActivity;
import zk.weart.api.activity.service.ITActivityService;
import zk.weart.core.aliyun.AliyunConfig;
import zk.weart.core.mybatis.PageFactory;
import zk.weart.core.mybatis.PageParam;
import zk.weart.core.response.ResultData;

/**
 * <p>
 * 活动表 前端控制器
 * </p>
 *
 * @author zkj
 * @since 2022-05-11
 */
@RestController
@RequestMapping("/activity/t-activity")
public class TActivityController {

    @Autowired
    ITActivityService itActivityService;


    @GetMapping("/get")
    public ResultData test(){

        TActivity tActivity = itActivityService.getById(1);
        return  ResultData.success(tActivity);
    }


    @GetMapping("/pageQuery")
    public ResultData pageQuery(PageParam pageParam){
        IPage page = PageFactory.getPage(pageParam);
        this.itActivityService.page(page);
        return  ResultData.success(page);
    }

}
